package model.requirement3;

// 配料装饰器（抽象类）
public abstract class ToppingDecorator extends BasePizza {
    protected BasePizza pizza; // 被装饰的披萨

    public ToppingDecorator(BasePizza pizza) {
        this.pizza = pizza;
    }

    @Override
    public String getDescription() {
        return pizza.getDescription(); // 继承基础描述
    }

    @Override
    public double getCost() {
        return pizza.getCost(); // 继承基础价格
    }
}

